package com.hyj.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hyj.entity.ConsumeLogs;
import com.hyj.service.ConService;
import com.hyj.service.StaService;


@Controller 
public class ConsumeLogsController {
	
	
	@Autowired
	ConService conService;
	@Autowired
	StaService staService;
	
	
	@ResponseBody
	@RequestMapping("getCon")
	public Object getLog(ConsumeLogs log) {
		List<ConsumeLogs> list =conService.getLog(log);
		log.setPage(null);
		log.setLimit(null);

		System.out.println("查得到日志全部数据" + list);
		Map<String, Object> map = new HashMap<String, Object>();
		List<ConsumeLogs> list2 =conService.getLog(log);
		map.put("code", 0);
		map.put("msg", "学生列表");
		map.put("count", list2.size()); 
		map.put("data", list);
		return map;
	}
	
}
